package com.hooenergy.etl.configuration;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.hooenergy.commons.util.JsonHelper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration

public class BeanConfig {


    /**
     * 自定义ObjectMapper
     *
     * @return
     */
    @Bean
    @Primary
    public ObjectMapper createObjectMapper() {
        ObjectMapper objectMapper = new ObjectMapper();
        //通用设置
        JsonHelper.configure(objectMapper);
        return objectMapper;
    }
}
